<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class Rule extends Model{

    protected $table="rule";
    /**
     * @param $id
     * @return array
     */
    protected  function getRuleInfoByWhere($where)
    {
        return $this->where($where)->first();
    }
    protected  function getValueByWhere($key)
    {
        $val = $this->where('key',$key)->first();
        return $val->value;
    }

}